/**
 * desc: 相关课件接口
 */

import request from '@/static/uitls/request.js'

// 当前教师授课学生列表
const getTStudentList = () => {
	return request({
		url: '/teacher/v1/file/student',
		method: 'GET'
	})
}

// 课件列表
const getTCoursewareList = (page,size,showOnload=true) => {
	return request({
		url: '/teacher/v1/file/index',
		method: 'GET',
		data:{
			page:page,
			size:size
		},
		showOnload
	})
}

// 上传课件
const sendTCourseware = data => {
	return request({
		url: '/teacher/v1/file/upload',
		method: 'POST',
		data
	})
}

// 删除课件
const deleteTCourseware = id => {
	return request({
		url: '/teacher/v1/file/delete?teacher_file_id='+id,
		method: 'GET'
	})
}

// 分享课件
const shareTCourseware = data => {
	return request({
		url: '/teacher/v1/file/share',
		method: 'POST',
		data
	})
}

module.exports = {
	getTStudentList,
	getTCoursewareList,
	sendTCourseware,
	deleteTCourseware,
	shareTCourseware
}
